package code16_thread;

public class MyThread1 extends Thread {
	@Override
	public void run() {
		// 线程需要执行的任务代码
		for (int i = 0; i < 100; i++) {
			// 获取当前线程名, 默认线程名是 Thread-编号(编号从0开始)
			String threadName = this.getName();
			System.out.println(threadName + ":" + i);
		}
	}
}
